import request from '@/utils/request'

// 查询销售组长关系列表
export function listSalesGroupRelation(query) {
  return request({
    url: '/business/salesGroupRelation/list',
    method: 'get',
    params: query
  })
}

// 查询下拉框
export function getSalesmanUserData(query) {
  return request({
    url: '/business/salesGroupRelation/salesmanUserData',
    method: 'get',
    params: query
  })
}

// 查询销售组长关系详细
export function getSalesGroupRelation(geekSalesCaptainId) {
  return request({
    url: '/business/salesGroupRelation/' + geekSalesCaptainId,
    method: 'get'
  })
}

// 新增销售组长关系
export function addSalesGroupRelation(data) {
  return request({
    url: '/business/salesGroupRelation',
    method: 'post',
    data: data
  })
}

// 修改销售组长关系
export function updateSalesGroupRelation(data) {
  return request({
    url: '/business/salesGroupRelation',
    method: 'put',
    data: data
  })
}

// 删除销售组长关系
export function delSalesGroupRelation(query) {
  return request({
    url: '/business/salesGroupRelation/remove',
    method: 'delete',
    params: query
  })
}
